import React, {
  Component
} from 'react'
import Pagination from 'antd/lib/pagination'
class Page extends Component {

  changePage(pageNumber) {
    this.props.changePage(pageNumber)
  }

  render() {
    return (
      <div style={{overflow:"hidden"}}>
      {
        this.props.total==0?'':
        <Pagination 
        className='page'
        onChange={this.changePage.bind(this)}
        pageSize={this.props.size}
        current={this.props.currentPage} 
        total={this.props.total || 0} />
      }
        
      </div>
    )
  }
}

export default Page